package cn.tedu.review;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/*本类用于注解的快速回顾*/
public class TestAnnotation {

}
@Target({ElementType.TYPE,ElementType.FIELD})
@Retention(RetentionPolicy.CLASS)

@interface Rice{
    char gender() default '男';
    String value() default "哈哈哈";

}
@Rice(gender = '男',value = "张三")
class TestAnno{
    @Rice(gender ='女')
    String kind;
    public void eat(){
        System.out.println("eat()");
    }
}